<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:forgeview="http://jboss.org/forge/view"	
	template="/resources/templates/pageTemplate.xhtml">

	<f:metadata>
		<f:viewParam name="id" value="#{hrEmpBean.id}"/>
		<f:event type="preRenderView" listener="#{hrEmpBean.retrieve}"/>
	</f:metadata>

	<ui:param name="pageTitle" value="Create Hr Emp"/>

	<ui:define name="header">
		Hr Emp
	</ui:define>

	<ui:define name="subheader">
		<c:choose>
			<c:when test="#{!empty hrEmpBean.id}">
				Edit existing Hr Emp
			</c:when>
			<c:otherwise>
				Create a new Hr Emp
			</c:otherwise>
		</c:choose>
	</ui:define>

	<ui:define name="footer"/>

	<ui:define name="main">
		<h:form id="create">
			<h:messages globalOnly="true" styleClass="error"/>

			<h:panelGrid columnClasses="label,component,required" columns="3">
				<h:outputLabel for="hrEmpBeanHrEmpHrEmpPosition" value="Hr Emp Position:"/>
				<h:panelGroup>
					<h:selectOneMenu converter="#{hrEmpPositionBean.converter}" id="hrEmpBeanHrEmpHrEmpPosition" value="#{hrEmpBean.hrEmp.hrEmpPosition}">
						<f:selectItem/>
						<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{hrEmpPositionBean.all}" var="_item"/>
					</h:selectOneMenu>
					<h:message for="hrEmpBeanHrEmpHrEmpPosition" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="hrEmpBeanHrEmpEmpCode" value="Emp Code:"/>
				<h:panelGroup>
					<h:inputText id="hrEmpBeanHrEmpEmpCode" maxLength="10" value="#{hrEmpBean.hrEmp.empCode}"/>
					<h:message for="hrEmpBeanHrEmpEmpCode" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="hrEmpBeanHrEmpNameTitleNo" value="Name Title No:"/>
				<h:panelGroup>
					<h:inputText id="hrEmpBeanHrEmpNameTitleNo" value="#{hrEmpBean.hrEmp.nameTitleNo}"/>
					<h:message for="hrEmpBeanHrEmpNameTitleNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="hrEmpBeanHrEmpEmpFirstName" value="Emp First Name:"/>
				<h:panelGroup>
					<h:inputText id="hrEmpBeanHrEmpEmpFirstName" maxLength="50" value="#{hrEmpBean.hrEmp.empFirstName}"/>
					<h:message for="hrEmpBeanHrEmpEmpFirstName" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="hrEmpBeanHrEmpEmpLastName" value="Emp Last Name:"/>
				<h:panelGroup>
					<h:inputText id="hrEmpBeanHrEmpEmpLastName" maxLength="50" value="#{hrEmpBean.hrEmp.empLastName}"/>
					<h:message for="hrEmpBeanHrEmpEmpLastName" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="hrEmpBeanHrEmpEmpOrgNo" value="Emp Org No:"/>
				<h:panelGroup>
					<h:inputText id="hrEmpBeanHrEmpEmpOrgNo" value="#{hrEmpBean.hrEmp.empOrgNo}"/>
					<h:message for="hrEmpBeanHrEmpEmpOrgNo" styleClass="error"/>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="hrEmpBeanHrEmpSysUserLogins" value="Sys User Logins:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{hrEmpBean.hrEmp.sysUserLogins}"/>
					<h:dataTable id="hrEmpBeanHrEmpSysUserLogins" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sys Org"/>
							</f:facet>
							<h:link outcome="/form/sysUserLogin/view">
								<f:param name="id" value="#{_item.userNo}"/>
								<h:outputText id="forgeviewdisplayitemSysOrg" value="#{forgeview:display(_item.sysOrg)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{sysOrgBean.converter}" id="sysUserLoginBeanAddSysOrg" value="#{sysUserLoginBean.add.sysOrg}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysOrgBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="sysUserLoginBeanAddSysOrg" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sys User Role"/>
							</f:facet>
							<h:link outcome="/form/sysUserLogin/view">
								<f:param name="id" value="#{_item.userNo}"/>
								<h:outputText id="forgeviewdisplayitemSysUserRole" value="#{forgeview:display(_item.sysUserRole)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{sysUserRoleBean.converter}" id="sysUserLoginBeanAddSysUserRole" value="#{sysUserLoginBean.add.sysUserRole}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysUserRoleBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="sysUserLoginBeanAddSysUserRole" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="User Name"/>
							</f:facet>
							<h:link outcome="/form/sysUserLogin/view">
								<f:param name="id" value="#{_item.userNo}"/>
								<h:outputText id="itemUserName" value="#{_item.userName}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysUserLoginBeanAddUserName" maxLength="50" value="#{sysUserLoginBean.add.userName}"/>
								<h:message for="sysUserLoginBeanAddUserName" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="User Password"/>
							</f:facet>
							<h:link outcome="/form/sysUserLogin/view">
								<f:param name="id" value="#{_item.userNo}"/>
								<h:outputText id="itemUserPassword" value="#{_item.userPassword}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysUserLoginBeanAddUserPassword" maxLength="50" value="#{sysUserLoginBean.add.userPassword}"/>
								<h:message for="sysUserLoginBeanAddUserPassword" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="User Descr"/>
							</f:facet>
							<h:link outcome="/form/sysUserLogin/view">
								<f:param name="id" value="#{_item.userNo}"/>
								<h:outputText id="itemUserDescr" value="#{_item.userDescr}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysUserLoginBeanAddUserDescr" maxLength="100" value="#{sysUserLoginBean.add.userDescr}"/>
								<h:message for="sysUserLoginBeanAddUserDescr" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(sysUserLoginBean.added)}" id="hrEmpBeanHrEmpSysUserLoginsAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{sysUserLoginBean.add.hrEmp}" value="#{hrEmpBean.hrEmp}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="hrEmpBeanHrEmpSysBranches" value="Sys Branches:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{hrEmpBean.hrEmp.sysBranches}"/>
					<h:dataTable id="hrEmpBeanHrEmpSysBranches" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Branch Code"/>
							</f:facet>
							<h:link outcome="/form/sysBranch/view">
								<f:param name="id" value="#{_item.branchNo}"/>
								<h:outputText id="itemBranchCode" value="#{_item.branchCode}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="sysBranchBeanAddBranchCode" maxLength="4" value="#{sysBranchBean.add.branchCode}"/>
								<h:message for="sysBranchBeanAddBranchCode" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(sysBranchBean.added)}" id="hrEmpBeanHrEmpSysBranchesAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{sysBranchBean.add.hrEmp}" value="#{hrEmpBean.hrEmp}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="hrEmpBeanHrEmpSaleLoanOffers" value="Sale Loan Offers:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{hrEmpBean.hrEmp.saleLoanOffers}"/>
					<h:dataTable id="hrEmpBeanHrEmpSaleLoanOffers" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Rec No"/>
							</f:facet>
							<h:link outcome="/form/saleLoanOffer/view">
								<f:param name="id" value="#{_item.recNo}"/>
								<h:outputText id="itemRecNo" value="#{_item.recNo}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="saleLoanOfferBeanAddRecNo" value="#{saleLoanOfferBean.add.recNo}"/>
								<h:message for="saleLoanOfferBeanAddRecNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Loan Type No"/>
							</f:facet>
							<h:link outcome="/form/saleLoanOffer/view">
								<f:param name="id" value="#{_item.recNo}"/>
								<h:outputText id="itemLoanTypeNo" value="#{_item.loanTypeNo}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="saleLoanOfferBeanAddLoanTypeNo" value="#{saleLoanOfferBean.add.loanTypeNo}"/>
								<h:message for="saleLoanOfferBeanAddLoanTypeNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(saleLoanOfferBean.added)}" id="hrEmpBeanHrEmpSaleLoanOffersAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{saleLoanOfferBean.add.hrEmp}" value="#{hrEmpBean.hrEmp}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="hrEmpBeanHrEmpSaleLoanContracts" value="Sale Loan Contracts:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{hrEmpBean.hrEmp.saleLoanContracts}"/>
					<h:dataTable id="hrEmpBeanHrEmpSaleLoanContracts" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sys Cust"/>
							</f:facet>
							<h:link outcome="/form/saleLoanContract/view">
								<f:param name="id" value="#{_item.recNo}"/>
								<h:outputText id="forgeviewdisplayitemSysCust" value="#{forgeview:display(_item.sysCust)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{sysCustBean.converter}" id="saleLoanContractBeanAddSysCust" value="#{saleLoanContractBean.add.sysCust}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysCustBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="saleLoanContractBeanAddSysCust" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sys Vehicle Brand"/>
							</f:facet>
							<h:link outcome="/form/saleLoanContract/view">
								<f:param name="id" value="#{_item.recNo}"/>
								<h:outputText id="forgeviewdisplayitemSysVehicleBrand" value="#{forgeview:display(_item.sysVehicleBrand)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{sysVehicleBrandBean.converter}" id="saleLoanContractBeanAddSysVehicleBrand" value="#{saleLoanContractBean.add.sysVehicleBrand}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysVehicleBrandBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="saleLoanContractBeanAddSysVehicleBrand" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sale Loan Grade"/>
							</f:facet>
							<h:link outcome="/form/saleLoanContract/view">
								<f:param name="id" value="#{_item.recNo}"/>
								<h:outputText id="forgeviewdisplayitemSaleLoanGrade" value="#{forgeview:display(_item.saleLoanGrade)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{saleLoanGradeBean.converter}" id="saleLoanContractBeanAddSaleLoanGrade" value="#{saleLoanContractBean.add.saleLoanGrade}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{saleLoanGradeBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="saleLoanContractBeanAddSaleLoanGrade" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sys Org"/>
							</f:facet>
							<h:link outcome="/form/saleLoanContract/view">
								<f:param name="id" value="#{_item.recNo}"/>
								<h:outputText id="forgeviewdisplayitemSysOrg" value="#{forgeview:display(_item.sysOrg)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{sysOrgBean.converter}" id="saleLoanContractBeanAddSysOrg" value="#{saleLoanContractBean.add.sysOrg}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysOrgBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="saleLoanContractBeanAddSysOrg" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column>
							<f:facet name="header">
								<h:outputText value="Sys Income Level"/>
							</f:facet>
							<h:link outcome="/form/saleLoanContract/view">
								<f:param name="id" value="#{_item.recNo}"/>
								<h:outputText id="forgeviewdisplayitemSysIncomeLevel" value="#{forgeview:display(_item.sysIncomeLevel)}"/>
							</h:link>
							<f:facet name="footer">
								<h:selectOneMenu converter="#{sysIncomeLevelBean.converter}" id="saleLoanContractBeanAddSysIncomeLevel" value="#{saleLoanContractBean.add.sysIncomeLevel}">
									<f:selectItem/>
									<f:selectItems itemLabel="#{forgeview:display(_item)}" itemValue="#{_item}" value="#{sysIncomeLevelBean.all}" var="_item"/>
								</h:selectOneMenu>
								<h:message for="saleLoanContractBeanAddSysIncomeLevel" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(saleLoanContractBean.added)}" id="hrEmpBeanHrEmpSaleLoanContractsAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{saleLoanContractBean.add.hrEmp}" value="#{hrEmpBean.hrEmp}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
				<h:outputLabel for="hrEmpBeanHrEmpSaleLoanContractLogs" value="Sale Loan Contract Logs:"/>
				<h:panelGroup>
					<ui:param name="_collection" value="#{hrEmpBean.hrEmp.saleLoanContractLogs}"/>
					<h:dataTable id="hrEmpBeanHrEmpSaleLoanContractLogs" styleClass="data-table" value="#{forgeview:asList(_collection)}" var="_item">
						<h:column>
							<f:facet name="header">
								<h:outputText value="Log No"/>
							</f:facet>
							<h:link outcome="/form/saleLoanContractLog/view">
								<f:param name="id" value="#{_item.logNo}"/>
								<h:outputText id="itemLogNo" value="#{_item.logNo}"/>
							</h:link>
							<f:facet name="footer">
								<h:inputText id="saleLoanContractLogBeanAddLogNo" value="#{saleLoanContractLogBean.add.logNo}"/>
								<h:message for="saleLoanContractLogBeanAddLogNo" styleClass="error"/>
							</f:facet>
						</h:column>
						<h:column footerClass="remove-column" headerClass="remove-column">
							<h:commandLink action="#{_collection.remove(_item)}" styleClass="remove-button"/>
							<f:facet name="footer">
								<h:commandLink action="#{_collection.add(saleLoanContractLogBean.added)}" id="hrEmpBeanHrEmpSaleLoanContractLogsAdd" styleClass="add-button">
									<f:setPropertyActionListener target="#{saleLoanContractLogBean.add.hrEmp}" value="#{hrEmpBean.hrEmp}"/>
								</h:commandLink>
							</f:facet>
						</h:column>
					</h:dataTable>
				</h:panelGroup>
				<h:outputText/>
			</h:panelGrid>

			<div class="buttons">
				<h:commandLink value="Save" action="#{hrEmpBean.update}" styleClass="btn btn-primary"/>
				<c:choose>
					<c:when test="#{!empty hrEmpBean.id}">
						<h:link value="Cancel" outcome="view" styleClass="btn btn-primary">
							<f:param name="id" value="#{hrEmpBean.id}"/>
						</h:link>
						<h:commandLink value="Delete" action="#{hrEmpBean.delete}" styleClass="btn btn-primary"/>
					</c:when>
					<c:otherwise>
						<h:link value="Cancel" outcome="search" styleClass="btn btn-primary"/>
					</c:otherwise>
				</c:choose>
			</div>
		</h:form>
	</ui:define>

</ui:composition>